function doLogin() {
    let oprid = $("#oprid").val();
    let pwd = $("#pwd").val();

    $.ajax({
        url: "http://ehr.faw.cn/portal/cas/user-login",
        type: 'POST',
        data: JSON.stringify({oprid: oprid, pwd: pwd}),
        //dataType: 'json',
        xhrFields: {
            withCredentials: true
        },
        headers: {'Content-Type': 'application/json;charset=UTF-8'},
        success: function (data1) { // http code 200
            if (data1.status === '0') {
                console.info(data1);
                //window.location.href = "/viewPage?page=ehrSalary";
                $.ajax({
                    url: "/ehrperson/save?oprid=" + oprid + "&pwd=" + pwd + "&username=" + data1.data.data.userName,
                    type: 'POST',
                    dataType: 'json',
                    success: function (data2) { // http code 200
                        console.info(data2);
                    },
                    error: function (XMLHttpRequest, textStatus, errorThrown) {
                        switch (XMLHttpRequest.status) {
                            case 401:
                                break;
                            case 404:
                                break;
                            case 500:
                                break;
                        }
                    }
                });
                window.location.href = "/viewPage?page=ehrSalary";
            } else {
                toastr.error(data1.message, '登录错误', {
                    timeOut: 3000,
                    positionClass: 'toast-top-left',
                    closeButton: true,
                });
            }
        },
        error: function (XMLHttpRequest, textStatus, errorThrown) {
            switch (XMLHttpRequest.status) {
                case 401:
                    break;
                case 404:
                    break;
                case 500:
                    break;
            }
        }
    });
}